import { Result, Button } from 'antd';
import { useRouter } from 'next/router';
import ClientOnly from '../components/common/ClientOnly';

const NotFoundPage = () => {
  const router = useRouter();

  const handleGoHome = () => {
    router.push('/');
  };

  return (
    <ClientOnly>
      <div style={{ 
        display: 'flex', 
        justifyContent: 'center', 
        alignItems: 'center', 
        minHeight: '100vh' 
      }}>
        <Result
          status="404"
          title="404"
          subTitle="抱歉，您访问的页面不存在。"
          extra={
            <Button type="primary" onClick={handleGoHome}>
              返回首页
            </Button>
          }
        />
      </div>
    </ClientOnly>
  );
};

export default NotFoundPage; 